ArcGIS Runtime SDK for WPF - Library Reference
HitTestAsync(Point,Int32,MessageLayerHitTestBehavior,Action<IList<Message>>) Method
See Also 
ESRI.ArcGIS.Client.AdvancedSymbology Namespace > MessageLayer Class > HitTestAsync Method : HitTestAsync(Point,Int32,MessageLayerHitTestBehavior,Action<IList<Message>>) Method

intersectingPoint
A System.Windows.Point representing the position on the map in screen coordinates.
maxHits
A System.Int32 representing the maximum number of hits to retrieve. Use this parameter to improve performance.
hitTestBehavior
A MessageLayerHitTestBehavior value determining how hit test calls are filtered to improve performance.
resultCallback
The Action that will be called with the hit test result as a IList of Messages. If no Message was hit, null will be passed to the callback.
Returns the visible messages at the specified screen location. Use the maxHits parameter to restrict the search and improve performance.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub HitTestAsync( _
   ByVal intersectingPoint As Point, _
   ByVal maxHits As Integer, _
   ByVal hitTestBehavior As MessageLayerHitTestBehavior, _
   ByVal resultCallback As Action(Of IList(Of Message)) _
) 

Remarks

Note that is is necessary to account for the difference between Map and application origin by using code similar to the following to perform a Transform on the input screen Point:

            GeneralTransform generalTransform = MyMap.TransformToVisual(Application.Current.MainWindow);
            System.Windows.Point transformScreenPoint = generalTransform.Transform(screenPoint);
            

Parameters

intersectingPoint
A System.Windows.Point representing the position on the map in screen coordinates.
maxHits
A System.Int32 representing the maximum number of hits to retrieve. Use this parameter to improve performance.
hitTestBehavior
A MessageLayerHitTestBehavior value determining how hit test calls are filtered to improve performance.
resultCallback
The Action that will be called with the hit test result as a IList of Messages. If no Message was hit, null will be passed to the callback.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.